package com.foreverwin.jzymes.production.tool.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.foreverwin.jzymes.production.tool.mapper.ToolUsageLogMapper;
import com.foreverwin.jzymes.production.tool.domain.ToolUsageLog;
import com.foreverwin.jzymes.production.tool.service.IToolUsageLogService;

/**
 * 刀具记录 服务层实现
 * 
 * @author ervin
 * @date 2019-03-23
 */
@Service
public class ToolUsageLogServiceImpl implements IToolUsageLogService
{
	@Autowired
	private ToolUsageLogMapper toolUsageLogMapper;

	/**
     * 查询刀具记录信息
     * 
     * @param handle 刀具记录ID
     * @return 刀具记录信息
     */
    @Override
	public ToolUsageLog selectToolUsageLogById(String handle)
	{
	    return toolUsageLogMapper.selectToolUsageLogById(handle);
	}
	
	/**
     * 查询刀具记录列表
     * 
     * @param toolUsageLog 刀具记录信息
     * @return 刀具记录集合
     */
	@Override
	public List<ToolUsageLog> selectToolUsageLogList(ToolUsageLog toolUsageLog)
	{
	    return toolUsageLogMapper.selectToolUsageLogList(toolUsageLog);
	}
	
    /**
     * 新增刀具记录
     * 
     * @param toolUsageLog 刀具记录信息
     * @return 结果
     */
	@Override
	public int insertToolUsageLog(ToolUsageLog toolUsageLog)
	{
	    return toolUsageLogMapper.insertToolUsageLog(toolUsageLog);
	}
	
	/**
     * 修改刀具记录
     * 
     * @param toolUsageLog 刀具记录信息
     * @return 结果
     */
	@Override
	public int updateToolUsageLog(ToolUsageLog toolUsageLog)
	{
	    return toolUsageLogMapper.updateToolUsageLog(toolUsageLog);
	}

	/**
     * 删除刀具记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteToolUsageLogByIds(String ids)
	{
		return toolUsageLogMapper.deleteToolUsageLogByIds(ids.split(","));
	}
	
}
